1. Field of the Invention
The present invention relates generally to the recording of data onto optical media, and more particularly to a method for optimizing the order in which files are recorded to optical media to minimize cache utilization and maximize recording efficiency.
2. Description of the Related Art
When recording data to optical media, a user typically selects a plurality of files from a source or plurality of sources, identifies a target destination, and executes a recording function. The selected files can be of any type including audio files, video files, photographic files, data files, and the like. The recording function is typically executed by use of an optical media recording program which accomplishes such tasks as mapping out precise locations of source files, determining size of source files, mapping out a precise target destination for the selected files, calculating a theoretical transfer rate for reading the file from a source and recording the file to a destination, identifying those files that will be cached and those files that will be recorded directly from source to destination, performing necessary formatting as required, and burning the selected files to a destination optical media.
A typical prior art process flow diagram 10 is illustrated in FIG. 1. The illustrated process flow is for the recording of data files to a destination optical media. The process begins after the files have been selected for burning to optical media. The method operations represent the general, and not the specific, tasks that are accomplished in the preparation and burning of data files to optical media.
In operation 12, an enumeration of the selected files is provided. The enumeration is typically a list of the selected files to be burned to optical media, their source locations, and file sizes.
After an enumeration of the selected files has been provided (signifying that files have been selected for burning to optical media), the method advances to operation 14 in which a system test is performed. The system test is performed to calculate an average file transfer rate. The system test includes evaluating files within a range. The evaluated range is subdivided into small files that are, for example, 0 and 300 KB in size, and large files that may be 1-10 Mbytes in size. The source drive is searched for a volume of files of both small and large size and then the system test calculates an average file transfer rate based on the files evaluated. The files evaluated are not necessarily those that have been selected for burning to an optical disc. The system test is performed one time, whether or not files are deleted from those selected for transfer, or additional files selected for transfer.
Following the system test, the method advances to operation 16 in which a caching algorithm is performed. In prior art optical media recording operations, a caching algorithm is usually a single-pass evaluation of each file in the enumeration of files to be burned to optical media obtained in operation 12. A simulated burn is performed in which no hardware is engaged, but each file is evaluated for a recording process. The caching algorithm performs a sequential evaluation of the selected files in the order of the enumeration of files. A theoretical transfer rate is calculated for each file based on the source location of the file, and the size of the file. The theoretical transfer rate of each file is used with the system transfer capability calculated in operation 14 to identify those files that will be cached during the actual recording operation.
FIG. 2A is a theoretical transfer rate table 100 listing the theoretical transfer rates of exemplary files selected to be recorded to optical media. File column 102 lists each of the files in the enumeration of files, and in the order in which the files are listed in the enumeration of files. Each file has a corresponding theoretical transfer rate noted in the transfer rate column 104. The theoretical transfer rate table 100 lists each file that has been selected for recording to optical media, and the theoretical transfer rate of each file based on the source location and file size, and using the system transfer capability as calculated in the system test of operation 14 of the flow chart 10 illustrated in FIG. 1.
As is known, when files are recorded to optical media, the files are read from a source location or a system cache into a buffer of a recording device. The files are then written to the destination or target optical media from the optical media recording device buffer, along with required file system and other data structures in order to comply with accepted data formats and specifications. The operation of burning files to optical media includes the simultaneous operations of reading data into the optical media device buffer and writing data to a destination optical media. In order to maintain a constant and error-free recording operation, the supply of data to the buffer and the depletion of data from the buffer must remain fairly constant with little tolerance for fluctuation between the filling and the depletion of the buffer. If the data files from the buffer are written to the target optical media faster than the reading of data into the buffer, then the buffer will empty resulting in buffer underrun and recording errors or the halting of the recording operation. As stated above, the enumeration of files is read and evaluated sequentially. The status of the capacity of the buffer, and the size and transfer rate of the data is evaluated for each of the data files in the sequential listing of the enumeration of files.
FIG. 2B is a block diagram of a buffer 110. Data is read into the buffer 110, and then written to the target media. The amount of data in the buffer fluctuates as data is read into the buffer at a system transfer rate (actual), and data is simultaneously written to the target optical media at a write speed, thereby depleting data from the buffer. Typically, the prior art caching algorithm sequentially reads and evaluates the files in the enumeration of files and selects files to be recorded from the source location and files to be sent to system cache based on maintaining a predetermined percentage of capacity in the buffer. By way of example, if the predetermined percentage of capacity is 20% 112, then files are sent to cache or read directly from a source location based on maintaining at least 20% 112 of maximum buffer capacity 114 in the buffer. Therefore, if an exemplary file is next in sequence in the enumeration, the exemplary file has a transfer rate that is slower than the burn rate, or write speed, and the percentage of capacity of the buffer would fall below 20% 112 during the transfer of the file, the file would most probably be cached.
Returning to the flow chart diagram 10, the method advances to operation 18 in which the identified files are cached. In the prior art algorithm, files are generally identified to be cached if the calculated transfer rate of the file is less than the burn rate and the buffer will empty below a predetermined percentage of capacity. By way of example, if a file is evaluated to have a transfer rate that is slower than the burn rate, and the buffer is projected to be at a low percentage of capacity when the file is to be transferred, then the file would probably be identified to be cached. If, however, the file has a transfer rate that is slower than the burn rate, but the buffer is projected to be at a high percentage of capacity such that it does not empty below a predetermined percentage of capacity during the transfer of the file, then the file would probably not be identified to be cached. As is known, the caching of files ensures a generally constant flow of data at a high speed to the buffer. Caching, however, adds additional time to the recording process by first reading the identified files at about the theoretical transfer rate into system cache, and then reading the files from the system cache into the buffer at a designated time.
Those files that have been identified to be cached as a result of the caching algorithm performed in operation 16, are sent to cache in operation 18. Following the caching of identified files, the method proceeds to burn the optical media in operation 20 and the method is done.
The prior art method of identifying and caching files for transfer does not provide the most efficient method of recording files to optical media, and can place significant burdens on system efficiency by consuming a maximum amount of system resource in the resulting caching operations. By sequentially evaluating the selected files in a single pass through the enumeration of files, one of two results is possible. Either the caching algorithm identifies those files that will be sent to cache and those files that can be read directly from a source location, or the caching algorithm returns an error informing the operator that not enough system cache is available to perform the recording operation. The latter possible result is more likely when a plurality of small files have been selected for recording, resulting in increased seek times and decreased transfer speeds. Further, the process of caching data adds time to the recording process. If a large amount of data is identified to be cached, the resulting recording time to bum even one optical media can be unreasonably long.
In view of the foregoing, there is a need for a more intelligent method of evaluating files selected for recording to optical media that will minimize cache size and maximize recording efficiency. The method should be configured to evaluate the plurality of files selected for recording for the most efficient combination of files and order of burning to optical media. The method should be further configured so that recording time is not unreasonably increased.
Broadly speaking, the present invention fills these needs by providing a method for optimizing the order in which data files are recorded to optical media. The present invention can be implemented in numerous ways, including as a process, an apparatus, a system, a device, a method, or a computer readable media. Several embodiments of the present invention are described below.
In one embodiment, a method for maximizing the recording efficiency for recording data from a source to an optical media is disclosed. The method includes identifying a list of files to be recorded, and then generating a plurality of recording orders or sequences for the list. The method further determines a plurality of writing speeds for an optical media recording device, and then evaluates the amount of system cache needed and the projected recording time for each of the plurality of recording orders or sequences for the list of files at each of the plurality of writing speeds. The method then selects a single recording order and a single writing speed that minimizes system cache utilization and minimizes actual recording time from the source to the optical media.
In another embodiment, a computer method for recording data from a source to an optical disc is disclosed. The method includes obtaining a list of files to be recorded. The method refers to a plurality of recording orders for the list of files to be recorded, and obtains a plurality of writing speeds of an optical recording device. The method provides that for each of the plurality of recording orders, a projected recording time at each of the plurality of writing speeds is evaluated. The method then selects a single recording order and a single write speed that minimizes actual recording time to record the data.
In still a further embodiment, a method for optimizing the recording order of data files selected to be recorded to optical media is disclosed. The method includes obtaining a first sequence of data files selected to be recorded to the optical media, and setting a first write speed for recording to the optical media. The method then provides for evaluating the first sequence of data files at the first write speed. Next, the method sets a second write speed for recording to the optical media, and evaluates the first sequence of data files at the second write speed. The method then obtains a second sequence of data files and repeat the setting and evaluating, using the obtained second sequence in place of the obtained first sequence. The method then selects one of the first or second sequences of data files for recording at one of the first or second write speeds. The selected sequence and write speed is configured to match a sequence of data files with a write speed so as to minimize cache utilization and recording time.
The advantages of the present invention are numerous. One notable benefit and advantage of the invention is that recording speed and efficiency are greatly improved making the recording of data files to optical media an easier and more accessible task for the average consumer. By increasing the recording efficiency, more system resources are available for normal system processing, thereby reducing the risk of system crash or recording error. More noticeable to the average user, the more efficient the recording process is, the faster the process becomes. Speed and efficiency combine to make the recording process a simple task that presents fewer barriers or obstacles, and thus becomes more accessible to the average user.
Another benefit of note is that the method of the present invention reduces the likelihood of returned errors indicating selected files cannot be recorded due to a lack of available resources. By evaluating a plurality of file sequences and combinations, the present invention provides a method more likely to identify a recording sequence of files that can be accomplished with available system cache, and in the most efficient manner at the fastest recording and through-put speeds.